#!/bin/bash
# 这里请根据实际项目进行设置
cd $GOPATH/src/github.com/hyperbench/hyperbench

st=0
counter=0

#echo "1. gofmt.."
#find . -path '*/vendor/*' -prune -o -name '*.go' -type f -exec gofmt -s -w {} \;
#[ $? -ne 0 ] && exit 1

#echo "2. golangci-lint run.."
#golangci-lint run

[ $st -ne 0 ] && exit 1

# add formatted files
git add -u